<?php

namespace App\Http\Controllers\Wechat;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\CarBrand;
use App\Http\Requests\Api\ApiRequest;

class CarBrandController extends Controller
{
    public function index(Request $request)
    {
    	$rs['status'] = true;
    	$where = [];
    	if($request->is_rec) {
    		$where['is_rec'] = 1;	
    	}
    	 
    	$list = CarBrand::select(['id','name','img'])
    						->where($where)
    						->orderBy('id','asc')
    						->get();
    	$rs['data'] = $list;
    	return response()->json($rs);					

    } 
}
